﻿CREATE TABLE [CAT].[Customers]
(
	[Id] INT NOT NULL PRIMARY KEY IDENTITY, 
    [Code] VARCHAR(20) NOT NULL, 
    [Name] VARCHAR(50) NOT NULL DEFAULT '', 
    [Description] VARCHAR(200) NOT NULL DEFAULT '', 
	[Address] VARCHAR(200) NOT NULL DEFAULT '', 
    [City] VARCHAR(50) NOT NULL DEFAULT '', 
    [Contact] VARCHAR(50) NOT NULL DEFAULT '', 
    [Cuit] VARCHAR(13) NOT NULL DEFAULT '', 
    [Email] VARCHAR(100) NOT NULL DEFAULT '', 
    [Telephone] VARCHAR(50) NOT NULL DEFAULT '', 
    [Active] BIT NOT NULL DEFAULT 1, 
    [Important] BIT NOT NULL DEFAULT 0, 
    CONSTRAINT [UK_CAT.Customers.Code] UNIQUE(Code),
)

GO
CREATE INDEX [IX_CAT.Customers_Name] ON [CAT].[Customers] ([Name])

GO
CREATE INDEX [IX_CAT.Customers_Code] ON [CAT].[Customers] ([Code])